/*
 * @Description:
 * @Autor: zzj
 * @Date: 2023-08-29 15:21:25
 * @LastEditors: zzj liberty666@aliyun.com
 * @LastEditTime: 2023-09-11 18:35:26
 * @FilePath: \vite-project\src\api\user\index.ts
 */
// 统一管理项目用户相关接口
import request from '@/utils/request'
import type { loginForm, loginResponseData, userResponseData } from './type'
// 统一管理接口
enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
  QUERY_FACE = '/query/face',
}
// 暴露请求函数
// 登录接口方法
export const reqLogin = (data: loginForm) =>
  request.post<any, loginResponseData>(API.LOGIN_URL, data)
// 获取用户信息
export const reqUserInfo = () =>
  request.get<any, userResponseData>(API.USERINFO_URL, data)
export const queryFace = (data: any) =>
  request.get<any, userResponseData>(API.QUERY_FACE, data)
